package com.zb.framework.wechatnews.common;

/**
 * @Auther: 周作为
 * @Date: 2019/6/18 11:18
 * @Description: 异常处理类
 */
public class BizException extends RuntimeException {


    private int code;

    private String msg;

    private EnumsError enumsError;

    public BizException(EnumsError enumsError) {
        this.code = enumsError.getCode();
        this.msg = enumsError.getMsg();
    }

    public BizException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public EnumsError getEnumsError() {
        return enumsError;
    }

    public void setEnumsError(EnumsError enumsError) {
        this.enumsError = enumsError;
    }
}
